Real World OCaml (beta 2, community edition) by Yaron Minsky Anil Madhavapeddy Jason Hickey
Author:Yaron Minsky, Anil Madhavapeddy, Jason Hickey
Language: eng
Format: epub
Published: 2013-08-16T16:00:00+00:00
OCaml UTop ∗ classes/iter.topscript ∗ all code
Next, we'll define an actual iterator for lists. We can use this to iterate over the contents of our stack.
# class ['a] list_iterator init = object val mutable current : 'a list = init method has_value = current <> [] method get = match current with hd :: tl -> hd | [] -> raise (Invalid_argument "no value") method next = match current with hd :: tl -> current <- tl | [] -> raise (Invalid_argument "no value") end ;;
class ['a] list_iterator : 'a list -> object val mutable current : 'a list method get : 'a method has_value : bool method next : unit end
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(22431)
Hello! Python by Anthony Briggs(21622)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(20183)
Dependency Injection in .NET by Mark Seemann(19563)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(19309)
Kotlin in Action by Dmitry Jemerov(19233)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(18772)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(17575)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(16963)
Grails in Action by Glen Smith Peter Ledbrook(16726)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(10923)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(8065)
Microservices with Go by Alexander Shuiskov(7829)
Practical Design Patterns for Java Developers by Miroslav Wengner(7732)
Test Automation Engineering Handbook by Manikandan Sambamurthy(7691)
Angular Projects - Third Edition by Aristeidis Bampakos(7176)
The Art of Crafting User Stories by The Art of Crafting User Stories(6622)
NetSuite for Consultants - Second Edition by Peter Ries(6545)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(6314)